Implement a UX workaround for rope/pyls rename issue #127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement a UX workaround for rope/pyls rename issue for the case of syntax errors in the source code.
In #115 an issue with rename for Python (when using pyls) was identified:
rename was failing with an obscure message when the source code could not be parsed correctly by rope (due to a user's syntax error).
This workaround detects such a condition using diagnostics feature provides a nice error message to the user (UX first).
References
#115
Code changes
ICommandContext
now includesVirtualEditor
.Diagnostics
feature got a new, public database of diagnostics (diagnostics_db: IEditorDiagnostic[]
) which will be also used to implement the diagnostics Panel widget (#42).User-facing changes
Note: the error is in the 4th cell (1-based indexing) because above the code cells there are two markdown cells; we could change the code to display the ordinal number for code cells only (but not sure how it would work in future if we decide to analyze markdown cells too).
Backwards-incompatible changes
None
Chores